home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / ps40sdk / examples / export / history / common / history.r < prev    next >
Encoding:
Text File  |  1996-11-08  |  5.3 KB  |  264 lines

  1. /*
  2.     File: History.r
  3.  
  4.     Copyright (c) 1990-1, Thomas Knoll.
  5.     Copyright (c) 1992-6, Adobe Systems Incorporated.
  6.     All rights reserved.
  7.     
  8.     Rez source file for History export example.
  9. */
  10.  
  11. /********************************************************************************/
  12. /* Defines required for include files */
  13.  
  14. #define plugInName            "History"
  15. #define VersionString        "4.0"
  16.  
  17. /********************************************************************************/
  18.  
  19. #if Macintosh
  20. #include "Types.r"
  21. #include "SysTypes.r"
  22. #include "PIGeneral.r"
  23. #include "PIUtilities.r"
  24. #include "DialogUtilities.r"
  25. #endif
  26.  
  27. #if MSWindows
  28. #include "PIGeneral.h"
  29. #include "PIUtilities.r"
  30. #include "WinDialogUtils.r"
  31. #endif
  32.  
  33. #include "PIActions.h"
  34.  
  35. /********************************************************************************/
  36.  
  37. #define plugInComment         "history example export plug-in"
  38. #define vendorName            "AdobeSDK"
  39. #define ourSuiteID            'sdKB'
  40. #define ourClassID            'hisT'
  41. #define ourEventID            typeNull // must be this
  42.  
  43. #define kNoHistories        ResourceID+100
  44. #define kHistStatus            kNoHistories+1
  45.  
  46. /********************************************************************************/
  47.  
  48. resource 'PiPL' (ResourceID, purgeable)
  49. {
  50.     {
  51.         Kind { Export },
  52.         Name { plugInName "..." },
  53.         Version { (latestExportVersion << 16) | latestExportSubVersion },
  54.  
  55.         #if Macintosh
  56.         Code68K { Export, $$ID },
  57.         CodePowerPC { 0, 0, "" },
  58.         #endif
  59.  
  60.         #if MSWindows
  61.         CodeWin32X86 { "ENTRYPOINT" },
  62.         #endif
  63.  
  64.         HasTerminology { ourClassID, ourEventID, ResourceID, "" },
  65.         /* class ID, event ID, aete ID, uniqueString */
  66.         
  67.         SupportedModes
  68.             {
  69.             noBitmap, doesSupportGrayScale,
  70.             doesSupportIndexedColor, doesSupportRGBColor,
  71.             doesSupportCMYKColor, doesSupportHSLColor,
  72.             doesSupportHSBColor, doesSupportMultichannel,
  73.             doesSupportDuotone, doesSupportLABColor
  74.             },
  75.             
  76.         EnableInfo { "true" }
  77.  
  78.     }
  79. };
  80.  
  81. resource 'PiMI' (ResourceID, purgeable)
  82.       latestExportVersion,
  83.       latestExportSubVersion,
  84.       0,
  85.       supportsGrayScale +
  86.       supportsIndexedColor +
  87.       supportsRGBColor +
  88.       supportsCMYKColor +
  89.       supportsHSLColor +
  90.       supportsHSBColor +
  91.       supportsMultichannel +
  92.       supportsDuotone +
  93.       supportsLABColor,
  94.       '    ', /* No required host */
  95.       {},
  96. };
  97.  
  98. /* Prompt strings */
  99.  
  100. resource StringResource (kNoHistories, "No histories", purgeable)
  101. {
  102.     "No history resources in this document."
  103. };
  104.  
  105. resource StringResource (kHistStatus, "History status", purgeable)
  106. {
  107.     "^0 to ^1 of ^2"
  108. };
  109.  
  110.  
  111. /* About resources */
  112.  
  113. resource StringResource (AboutID, "About Text", purgeable)
  114. {
  115.     plugInName "\n\n"
  116.     "Version " VersionString " "
  117.     "Release " ReleaseString "\n"
  118.     "Copyright ⌐ 1990-6, Adobe Systems Incorporated.\n"
  119.     "All rights reserved.\n\n"
  120.     "An example plug-in export module for Adobe Photoshop¿."
  121. };
  122.  
  123. /* UI */
  124.  
  125. resource 'DLOG' (ResourceID+1, "UI", purgeable)
  126. {
  127.     {133, 229, 381, 625},
  128.     movableDBoxProc,
  129.     visible,
  130.     noGoAway,
  131.     0x0,
  132.     ResourceID+1,
  133.     plugInName
  134. };
  135.  
  136. resource 'DITL' (ResourceID+1, "UI", purgeable)
  137. {
  138.     {    /* array DITLarray: 14 elements */
  139.         /* [1] */
  140.         {12, 298, 32, 378},
  141.         Button {
  142.             enabled,
  143.             "OK"
  144.         },
  145.         /* [2] */
  146.         {42, 298, 62, 378},
  147.         Button {
  148.             enabled,
  149.             "Cancel"
  150.         },
  151.         /* [3] */
  152.         {81, 298, 101, 378},
  153.         Button {
  154.             enabled,
  155.             "Trim First"
  156.         },
  157.         /* [4] */
  158.         {107, 298, 127, 378},
  159.         Button {
  160.             enabled,
  161.             "Trim Last"
  162.         },
  163.         /* [5] */
  164.         {145, 298, 165, 378},
  165.         Button {
  166.             enabled,
  167.             "Up"
  168.         },
  169.         /* [6] */
  170.         {171, 298, 191, 378},
  171.         Button {
  172.             enabled,
  173.             "Down"
  174.         },
  175.         /* [7] */
  176.         {204, 288, 244, 392},
  177.         StaticText {
  178.             disabled,
  179.             ""
  180.         },
  181.         /* [8] */
  182.         {1, 2, 36, 284},
  183.         StaticText {
  184.             disabled,
  185.             ""
  186.         },
  187.         /* [9] */
  188.         {35, 2, 70, 284},
  189.         StaticText {
  190.             disabled,
  191.             ""
  192.         },
  193.         /* [10] */
  194.         {69, 2, 104, 284},
  195.         StaticText {
  196.             disabled,
  197.             ""
  198.         },
  199.         /* [11] */
  200.         {103, 2, 138, 284},
  201.         StaticText {
  202.             disabled,
  203.             ""
  204.         },
  205.         /* [12] */
  206.         {137, 2, 172, 284},
  207.         StaticText {
  208.             disabled,
  209.             ""
  210.         },
  211.         /* [13] */
  212.         {171, 2, 206, 284},
  213.         StaticText {
  214.             disabled,
  215.             ""
  216.         },
  217.         /* [14] */
  218.         {205, 2, 240, 284},
  219.         StaticText {
  220.             disabled,
  221.             ""
  222.         }
  223.     }
  224. };
  225.  
  226. /* scripting dictionary resource */
  227.  
  228. resource 'aete' (ResourceID, purgeable)
  229. {
  230.     1, 0, english, roman,                                    /* aete version and language specifiers */
  231.     {
  232.         vendorName,                                            /* vendor suite name */
  233.         "Adobe example plug-ins",                            /* optional description */
  234.         ourSuiteID,                                            /* suite ID */
  235.         1,                                                    /* suite code, must be 1 */
  236.         1,                                                    /* suite level, must be 1 */
  237.         {},                                                    /* structure for filters */
  238.         {                                                    /* non-filter plug-in class here */
  239.             vendorName " history",                            /* unique class name */
  240.             ourClassID,                                        /* class ID, must be unique or Suite ID */
  241.             "outbound plug-in",                                /* optional description */
  242.             {                                                /* define inheritance */
  243.                 "<Inheritance>",                            /* must be exactly this */
  244.                 keyInherits,                                /* must be keyInherits */
  245.                 classExport,                                /* parent: Format, Import, Export */
  246.                 "parent class export",                        /* optional description */
  247.                 flagsSingleProperty,                        /* if properties, list below */
  248.                 
  249.                 "in",                                        /* our path */
  250.                 keyIn,                                        /* common key */
  251.                 typePlatformFilePath,                        /* correct path for platform */
  252.                 "file path",                                /* optional description */
  253.                 flagsSingleProperty
  254.                 
  255.                 /* no more properties */
  256.             },
  257.             {}, /* elements (not supported) */
  258.             /* class descriptions */
  259.         },
  260.         {}, /* comparison ops (not supported) */
  261.         {}    /* any enumerations */
  262.     }
  263. };